<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Event_Event</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Event_Event</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|											<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The Event class. Upon constructing an Event_Event the new instance will</p>
<p class="description"><p>automatically fire. This is done by signaling the Event_Handler statically about  its existence. This will in turn notify the actual event handlers that a  potentially interesting event has taken place. This implies that triggering events  is done by simply constucting an Event_Event:  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;constructs&nbsp;the&nbsp;event&nbsp;and&nbsp;signals&nbsp;potential&nbsp;handlers</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../../event/event/Event_Event.html">Event_Event</a></span><span class="src-sym">(</span><span class="src-str">'event-name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div></p><p>Classes triggering events need not extends specific classes, making this design  more flexible than e.g. the Dispatcher-Observer type patterns. The Event_Event  will determine itself who has triggered it, and will provide this information to  the Event_Handler when needed.</p><p>When an event is triggered by an instance, i.e. from a non-static method call,  that instance is available through the <a href="../../event/event/Event_Event.html#methodgetSource">getSource()</a> method. When triggered  during a static method call, this method provides the name (String) of the  triggering class.</p><p>Besides the instance triggering the Event, the arguments provided to the method  triggering the event can also be accessed through the <a href="../../event/event/Event_Event.html#methodgetArgs">getArgs</a> method.  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;no&nbsp;need&nbsp;to&nbsp;extend&nbsp;anything,&nbsp;allowing&nbsp;you&nbsp;to&nbsp;extend&nbsp;whatever</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;else&nbsp;you&nbsp;would&nbsp;really&nbsp;like&nbsp;to</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">class&nbsp;</span><span class="src-id">TriggeringClass</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-comm">//&nbsp;...</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">someTrigger</span><span class="src-sym">(</span><span class="src-var">$a</span><span class="src-sym">,&nbsp;</span><span class="src-var">$b</span><span class="src-sym">,&nbsp;</span><span class="src-var">$c</span><span class="src-sym">)</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../../event/event/Event_Event.html">Event_Event</a></span><span class="src-sym">(</span><span class="src-str">'trigger'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;...</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$oTriggeringClassInstance</span><span class="src-sym">-&gt;</span><span class="src-id">someTrigger</span><span class="src-sym">(</span><span class="src-str">'one'</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">,&nbsp;</span><span class="src-str">'THREE'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div>  &lt;p&gt;
 A call to <a href="../../event/event/Event_Event.html#methodgetArgs">getArgs()</a> will provide  &lt;/p&gt;  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'one'</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">,&nbsp;</span><span class="src-str">'THREE'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div></p><p>Events can be given additional information by adding an array when constructing  it:  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../../event/event/Event_Event.html">Event_Event</a></span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'some-event'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'key1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'value1'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'key2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'value2'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div></p><p>which is available through the <a href="../../event/event/Event_Event.html#methodgetParams">getParams()</a> method. Populate this array  with any information relevant to a handler.</p><p>Finally, the event keeps a prevent-default flag that may be checked by the  triggering instance. This way a handler could prevent the default action from  happening (if the triggering object supports this). This is facilitated by the  <a href="../../event/event/Event_Event.html#methodpreventDefault">preventDefault()</a> and <a href="../../event/event/Event_Event.html#methodisDefaultPrevented">isDefaultPrevented()</a> methods:</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-key">class&nbsp;</span><span class="src-id">TriggeringClass&nbsp;</span><span class="src-key">extends&nbsp;</span><span class="src-id">Your_Favorite_ORM</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;...</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">delete</span><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$oEvent&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../../event/event/Event_Event.html">Event_Event</a></span><span class="src-sym">(</span><span class="src-str">'delete'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-id">false&nbsp;</span>===&nbsp;<span class="src-var">$oEvent</span><span class="src-sym">-&gt;</span><span class="src-id">isDefaultPrevented</span><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-id">parent</span><span class="src-sym">::</span><span class="src-id">delete</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;...</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">}</span></div></li>
</ol></div></p><p>An Event_Handler would simply have to call  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-var">$oEvent</span><span class="src-sym">-&gt;</span><a href="../../event/event/Event_Event.html#methodpreventDefault">preventDefault</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Gerrit Jan van Ahee &lt;<a href="mailto:gerrit.jan@yes2web.nl">gerrit.jan@yes2web.nl</a>&gt;</li>
				<li><span class="field">version:</span> 1.0.1</li>
				<li><span class="field">copyright:</span> 2010-2011 Yes2web B.V.</li>
				<li><span class="field">see:</span> <a href="../../event/event/Event_Handler.html">Event_Handler</a>, <a href="../../event/event/Event_Exception.html">Event_Exception</a></li>
				<li><span class="field">link:</span> www.yes2web.nl</li>
				<li><span class="field">license:</span> MIT</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_classes---event---event.class.php.html">/classes/event/event.class.php</a> (line <span class="field">118</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
								|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../../event/event/Event_Exception.html">Event_Exception</a></td>
					<td>
											Event_Exceptions should be triggered by any Exception you throw
										</td>
				</tr>
							</table>
		</div>
	</div>


	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																																								<div class="var-title">
					<span class="var-type">Mixed[]</span>
					<a href="#$amArgv" title="details" class="var-name">$amArgv</a>
				</div>
																<div class="var-title">
					<span class="var-type">Mixed[]</span>
					<a href="#$amData" title="details" class="var-name">$amData</a>
				</div>
																<div class="var-title">
					<span class="var-type">Mixed[]</span>
					<a href="#$amParam" title="details" class="var-name">$amParam</a>
				</div>
																<div class="var-title">
					<span class="var-type">Mixed[]</span>
					<a href="#$amTrace" title="details" class="var-name">$amTrace</a>
				</div>
																<div class="var-title">
					<span class="var-type">bool</span>
					<a href="#$bDefaultPrevented" title="details" class="var-name">$bDefaultPrevented</a>
				</div>
																<div class="var-title">
					<span class="var-type">Mixed</span>
					<a href="#$mSource" title="details" class="var-name">$mSource</a>
				</div>
																<div class="var-title">
					<span class="var-type">String</span>
					<a href="#$sType" title="details" class="var-name">$sType</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																				<div class="method-definition">
					static 						<span class="method-result"><a href="../../event/event/Event_Event.html">Event_Event</a></span>
										<a href="#trigger" title="details" class="method-name">trigger</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$sType</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$amParam</span> = <span class="var-default">null</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$amTrace</span>)
									</div>
								
												<div class="method-definition">
											<span class="method-result">Event_Event</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$sType</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$amParam</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$amTrace</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">Mixed[]</span>
										<a href="#getArgs" title="details" class="method-name">getArgs</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">Mixed</span>
										<a href="#getData" title="details" class="method-name">getData</a>
											([<span class="var-type">String</span>&nbsp;<span class="var-name">$sDataName</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">Mixed[]</span>
										<a href="#getParams" title="details" class="method-name">getParams</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">Mixed</span>
										<a href="#getSource" title="details" class="method-name">getSource</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">String</span>
										<a href="#getType" title="details" class="method-name">getType</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#isDefaultPrevented" title="details" class="method-name">isDefaultPrevented</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#preventDefault" title="details" class="method-name">preventDefault</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setData" title="details" class="method-name">setData</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$sDataName</span>, <span class="var-type">String</span>&nbsp;<span class="var-name">$mDataValue</span>)
									</div>
																</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$amArgv" id="$amArgv"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">Mixed[]</span>
			<span class="var-name">$amArgv</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">171</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> the arguments that were provided to the source when called at the  time the event was triggered</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$amData" id="$amData"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">Mixed[]</span>
			<span class="var-name">$amData</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">180</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> List of variables that can be attached from the Event Handler  to the Event, in order to pass back information to the triggering instance</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$amParam" id="$amParam"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">Mixed[]</span>
			<span class="var-name">$amParam</span>
						(line <span class="line-number">166</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> list of additional values provided to this event by the triggerer</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$amTrace" id="$amTrace"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">Mixed[]</span>
			<span class="var-name">$amTrace</span>
						(line <span class="line-number">175</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> debug trace</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$bDefaultPrevented" id="$bDefaultPrevented"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">bool</span>
			<span class="var-name">$bDefaultPrevented</span>
			 = <span class="var-default"> false</span>			(line <span class="line-number">190</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Handlers can signal triggerers to prevent their default action, however they  will have to check this  first.</p>
	<ul class="tags">
				<li><span class="field">var:</span> prevent default?</li>
				<li><span class="field">see:</span> <a href="../../event/event/Event_Event.html#methodpreventDefault">Event_Event::preventDefault()</a></li>
				<li><span class="field">see:</span> <a href="../../event/event/Event_Event.html#methodisDefaultPrevented">Event_Event::isDefaultPrevented()</a></li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$mSource" id="$mSource"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">Mixed</span>
			<span class="var-name">$mSource</span>
						(line <span class="line-number">158</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> Object or String depending on triggering method: static: String  (classname), other: Object (instance)</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$sType" id="$sType"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">String</span>
			<span class="var-name">$sType</span>
						(line <span class="line-number">162</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> identifier of the type of this event</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodtrigger" id="trigger"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method trigger</span> (line <span class="line-number">147</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Shorthand for triggering an Event.</p>
<p class="description"><p>This method provides a slightly simpler/faster/easier way to trigger an  Event (faster as is: less code). This mostly applies to situations where you  would like to use the prevent default flag:  <div class="src-code"><ol><li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-id">false&nbsp;</span>===&nbsp;<span class="src-id"><a href="../../event/event/Event_Event.html">Event_Event</a></span><span class="src-sym">::</span><a href="../../event/event/Event_Event.html#methodtrigger">trigger</a><span class="src-sym">(</span><span class="src-str">'before-delete'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><a href="../../event/event/Event_Event.html#methodisDefaultPrevented">isDefaultPrevented</a><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;delete</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../../event/event/Event_Event.html">Event_Event</a></span><span class="src-sym">(</span><span class="src-str">'delete'</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;no&nbsp;&quot;default&quot;,&nbsp;so&nbsp;don't&nbsp;care</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;one&nbsp;of&nbsp;the&nbsp;event&nbsp;handlers&nbsp;wished&nbsp;the&nbsp;deletion&nbsp;to&nbsp;be&nbsp;prevented</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
</ol></div></p><p>Off course, the same can be done using  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-var">$oEvent&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../../event/event/Event_Event.html">Event_Event</a></span><span class="src-sym">(</span><span class="src-str">'before-delete'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$oEvent</span><span class="src-sym">-&gt;</span><a href="../../event/event/Event_Event.html#methodisDefaultPrevented">isDefaultPrevented</a><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;</span>...&nbsp;<span class="src-sym">}</span></div></li>
</ol></div>  but for all us lazy people out there...</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> The triggered event</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result"><a href="../../event/event/Event_Event.html">Event_Event</a></span>
		<span class="method-name">
			trigger
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$sType</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$amParam</span> = <span class="var-default">null</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$amTrace</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$sType</span><span class="var-description">: Type of the event</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$amParam</span><span class="var-description">: additional parameters, default empty list</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$amTrace</span><span class="var-description">: trace to this call, defaults to debug_backtrace()</span>			</li>
				</ul>
		
			
	</div>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">199</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Construct an new Event by providing at least a type</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Event_Event</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$sType</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$amParam</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$amTrace</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$sType</span><span class="var-description">: Type of the event</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$amParam</span><span class="var-description">: additional parameters, default empty list</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$amTrace</span><span class="var-description">: trace to this call, defaults to debug_backtrace()</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../../event/event/Event_Exception.html#method__construct">Event_Exception::__construct()</a>
								: A new Event_Exception to signal handlers of a new Exception created
							</li>
				</ul>
	</div>
<a name="methodgetArgs" id="getArgs"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getArgs</span> (line <span class="line-number">260</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get all args that have been passed to the method that has thrown this event</p>
	<ul class="tags">
				<li><span class="field">return:</span> Argument vector provided to the method triggering this event</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Mixed[]</span>
		<span class="method-name">
			getArgs
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetData" id="getData"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getData</span> (line <span class="line-number">244</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get all or specific data: Allows any Handler to pass back information to  the triggering class or instance,</p>
<p class="description"><p>Example use:  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;in&nbsp;the&nbsp;triggering&nbsp;instance:</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$oEvent&nbsp;</span>=&nbsp;<span class="src-id">Event</span><span class="src-sym">::</span><span class="src-id">trigger</span><span class="src-sym">(</span><span class="src-str">'some-event'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;...</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sAffectedByEvent&nbsp;</span>=&nbsp;<span class="src-var">$oEvent</span><span class="src-sym">-&gt;</span><a href="../../event/event/Event_Event.html#methodgetData">getData</a><span class="src-sym">(</span><span class="src-str">'affected'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;or</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$amEventData&nbsp;</span>=&nbsp;<span class="src-var">$oEvent</span><span class="src-sym">-&gt;</span><a href="../../event/event/Event_Event.html#methodgetData">getData</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;in&nbsp;the&nbsp;handler&nbsp;(onSomeEvent):</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$oEvent</span><span class="src-sym">-&gt;</span><a href="../../event/event/Event_Event.html#methodsetData">setData</a><span class="src-sym">(</span><span class="src-str">'affected'</span><span class="src-sym">,&nbsp;</span><span class="src-num">15</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">return:</span> The entire data set when no specific entry was required, null  if the specific entry was not found or the value of the entry,</li>
				<li><span class="field">see:</span> <a href="../../event/event/Event_Event.html#methodsetData">Event_Event::setData()</a></li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Mixed</span>
		<span class="method-name">
			getData
		</span>
					([<span class="var-type">String</span>&nbsp;<span class="var-name">$sDataName</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$sDataName</span><span class="var-description">: the name of the specific data-entry requested.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetParams" id="getParams"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getParams</span> (line <span class="line-number">279</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get any additional parameters provided by the triggering instance/object (the  Source)</p>
	<ul class="tags">
				<li><span class="field">return:</span> list of parameters</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Mixed[]</span>
		<span class="method-name">
			getParams
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetSource" id="getSource"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getSource</span> (line <span class="line-number">269</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the instance (or classname in case of static call) triggering this Event</p>
	<ul class="tags">
				<li><span class="field">return:</span> Either the instance (Object) or the classname (String)</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Mixed</span>
		<span class="method-name">
			getSource
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetType" id="getType"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getType</span> (line <span class="line-number">288</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the type of $this Event</p>
	<ul class="tags">
				<li><span class="field">return:</span> The name of this event</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getType
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodisDefaultPrevented" id="isDefaultPrevented"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">isDefaultPrevented</span> (line <span class="line-number">298</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Has some handler signalled the prevention of the default actions?</p>
	<ul class="tags">
				<li><span class="field">return:</span> Should the default action be prevented by the triggering method</li>
				<li><span class="field">see:</span> Event_Event::preventDefault</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			isDefaultPrevented
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodpreventDefault" id="preventDefault"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">preventDefault</span> (line <span class="line-number">308</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Raise the flag that the default action following the event should be prevented</p>
<p class="description"><p>The flag can only be raised, never lowered</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Should the default action be prevented by the triggering method</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			preventDefault
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetData" id="setData"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setData</span> (line <span class="line-number">321</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set specific data: Allows any Handler to pass  back information to the triggering class or instance,</p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../../event/event/Event_Event.html#methodgetData">Event_Event::getData()</a></li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setData
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$sDataName</span>, <span class="var-type">String</span>&nbsp;<span class="var-name">$mDataValue</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$sDataName</span><span class="var-description">: the name of the specific data-entry to set.</span>			</li>
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$mDataValue</span><span class="var-description">: the value of the specific data-entry to set.</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Thu, 19 May 2011 10:21:01 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>